package bug.buffs
{
	import flash.utils.Dictionary;
	
	import spark.effects.easing.Power;
	
	import bug.Main;
	import bug.bugTest;

	public class BuffManager
	{

		public function BuffManager()
		{
		}
		private static var _buffDic:Dictionary;
		public static function getBuffById(id:int):BuffData{
			 if(_buffDic==null){
				 _buffDic = new Dictionary();
				 
				 var _buffData:XML  =Main.staticData.getAlllBuff();
				 var temp:BuffData;
				 for each (var i:* in _buffData.item) 
				 {
					temp = new BuffData(i);
					_buffDic[temp.id]=temp;
				 }
				 
			 }
		     return _buffDic[id];
		}
		public static function getAllBuff():Dictionary{
			if(_buffDic==null){
			   getBuffById(1);
			}
		    return _buffDic;
		}
	}
}